package com.hmdp.common.utils;

public class RedisConstants {
//    登录相关
    public static final String LOGIN_CODE_KEY = "login:code:";
    public static final Long LOGIN_CODE_TTL = 4L; // 验证码有效时间
    public static final String LOGIN_TOKEN_KEY = "login:token:";
//    todo 暂时设置登录永久有效
    public static final Long LOGIN_TOKEN_TTL = 99999999999L; // 单次登录有效时间   每次请求刷新时间

    public static final Long CACHE_NULL_TTL = 2L; // 缓存空值的过期时长
    public static final String LOCK_KEY_PREFIX = "lock:";  // 锁key的前缀

// 特殊键
    public static final String QUERY_SHOP_KEY = "query:shop:";
    public static final Long QUERY_SHOP_TTL = 39L;

//  普通缓存键和时长
    public static final String QUERY_SHOP_TYPE_LIST = "query:shop:type:list";
    public static final Long QUERY_SHOP_TYPE_TTL = 37L;
    public static final String INCR_PREFIX = "incr:";
    public static final String SECKILL_VOUCHER = "seckill:voucher:";
    public static final Long LOCK_TTL = 10L;
    public static final String SECKILL_STOCK_KEY = "seckill:stock:";
    public static final String  SECKILL_ORDER_KEY = "seckill:order:";
    public static final String LOCK_VOUCHER_ORDER_KEY = "lock:order";
    public static final String BLOG_LIKED_KEY = "blog:liked:";
    public static final String USER_FOLLOW_KEY = "user:follow:";
    public static final String INBOX_KEY_PREFIX = "inbox:";
}
